package com.augn.controller;

import com.augn.entity.InvestmentProgress;
import com.augn.entity.InvestmentProgress;
import com.augn.entity.Result;
import com.augn.service.IInvestmentProgressService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Iterator;
import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author augn
 * @since 2022-09-22
 */
@RestController
@RequestMapping("/investmentProgress")
public class InvestmentProgressController {

    @Autowired
    private IInvestmentProgressService service;

    @PostMapping("/insertOne")
    public Result<?> insertOneInvestmentProgress(@RequestBody InvestmentProgress investmentProgress) {
        return service.insertOneInvestmentProgress(investmentProgress);
    }

    @DeleteMapping("/deleteOne/{id}")
    public Result<?> deleteOneInvestmentProgress(@PathVariable Integer id) {
        return service.deleteOneInvestmentProgress(id);
    }

    @PutMapping("/updateOne")
    public Result<?> updateOneInvestmentProgress(@RequestBody InvestmentProgress investmentProgress) {
        return service.updateOneInvestmentProgress(investmentProgress);
    }

    @GetMapping("/getOne/{id}")
    public Result<?> getOneInvestmentProgress(@PathVariable Integer id) {
        return service.getOneInvestmentProgress(id);
    }

}
